# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=typing
pkgbase=mingw-w64-python2-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}")
pkgver=3.6.1
pkgrel=1
pkgdesc='Backport of the standard library typing module to Python versions older than 3.6 (mingw-w64)'
url='https://pypi.python.org/pypi/typing'
license=('FSF')
arch=('any')
makedepends=("${MINGW_PACKAGE_PREFIX}-python2")
_dtoken="17/75/3698d7992a828ad6d7be99c0a888b75ed173a9280e53dbae67326029b60e"
source=("https://pypi.python.org/packages/${_dtoken}/${_realname}-${pkgver}.tar.gz")
sha256sums=('c36dec260238e7464213dcd50d4b5ef63a507972f5780652e835d0228d0edace')

prepare() {
  cd ${srcdir}
  cp -r ${_realname}-${pkgver} build-python2
}

build() {
  cd ${srcdir}/build-python2
  ${MINGW_PREFIX}/bin/python2 setup.py build
}

package() {
  cd ${srcdir}/build-python2
  MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
  ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}"
}
